package com.yangye.otherdemo.stringlocationdemo;

import java.util.ArrayList;
import java.util.List;

/**
 * 测试字符串常量池位置
 *
 * @author yangye
 * @date 2020/12/03
 */
public class StringLocationDemo {

	public static void main(String[] args) {
		List<String> list = new ArrayList<>();
		for (; ; ) {
			try {
				Thread.sleep(1);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
			list.add(String.valueOf(System.currentTimeMillis()).intern());
		}
	}
}
